package com.example.springmvcdemo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping(value = "/api")
@Controller
public class HelloController {
    @RequestMapping(value = "/hello")
    public String hello(){
        return "forward:/test.html";
    }

    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String hello1(){
        return "forward:/test.html";
    }

    @RequestMapping(value = "/hello",params = "name")
    public String hello2(){
        return "forward:/test.html";
    }
}
